package Textbookmanagement;

public class Inventory {
    Sell sell = new Sell();
    public static int remind;

    public void show() {
        System.out.println("1.库存信息    2.库存预警");
        System.out.println("             0.退出");
        System.out.println("请输入功能：");
    }

    public void Inventoryinformation() {//库存信息
        System.out.print(Order.num + "号库" + '\t');
        sell.delete();


    }

    public void Inventoryalerts() {//库存预警
        String str1 = Order.nameprice;
        String regex = "[\\s\\d\\p{Punct}]+";
        String[] dihitword1 = str1.split(regex);
        String str2 = Sell.name;
        String[] dihitword2 = str2.split(regex);
        remind = dihitword1.length - dihitword2.length;
        if (remind <= 1)
            System.out.println("书籍较少，请及时补充！");
    }

}
